﻿using System;
using System.Security.Cryptography;
using System.Text;

namespace BLL.Utility
{
    public class EncryptHelper
    {
        public static string MD5(string input)
        {
            MD5 m = new MD5CryptoServiceProvider();
            var s = m.ComputeHash(Encoding.UTF8.GetBytes(input));
            return BitConverter.ToString(s); 
        }


        public static string SHA(string iniput)
        {
            SHA1 sha1 = SHA1.Create();
            var s = sha1.ComputeHash(Encoding.UTF8.GetBytes(iniput));
            return BitConverter.ToString(s);
        }

    }
}